A web real-time communication (WebRTC) technology can implement functions such as audio and video communication and a multi-party conference between different browsers or between a browser and a terminal, as shown in FIG. 1.
On the left of FIG. 1, user 1 accesses a website of a WebRTC application, opens a web page of the WebRTC application, and establishes a communication connection with the website of the WebRTC application using JavaScript code in the web page. On the right of FIG. 1, user 2 also accesses the website of the WebRTC application, opens the web page of the WebRTC application, and establishes a communication connection with the website of the WebRTC application using the JavaScript code in the web page. In this case, user 1 and user 2 establish a connection with each other by using user information provided by the website of the WebRTC application, and invoke a function of their respective browsers by using a JavaScript application programming interface (API) to perform media stream transmission.
Currently, in the prior art, when user 1 uses terminal 1 (for example, a mobile phone) to participate in a WebRTC video conference, a conference server sends mixed videos/audio to terminal 1 after performing frequency mixing/audio mixing on videos/audio of all conference participants that participate in the video conference, or user 1 uploads video and audio information in terminal 1 to the conference server using terminal 1. However, the prior art has the following disadvantages: (1) The conference server can only distribute the mixed videos/audio to each user after performing the frequency mixing/audio mixing on the videos/audio of all the conference participants that participate in the video conference, and cannot collect or combine videos and audio of a specific conference participant, which reduces user experience, and also increases used bandwidth of the terminal and local resource consumption of the terminal.